﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RoomType.ascx.cs" Inherits="Hotel.UserControls.RoomType" %>


<style type="text/css">
    .auto-style1
    {
        width: 100%;
    }
</style>

<asp:Panel ID="pnlView" runat="server">
    <asp:GridView ID="gvpayment" runat="server" CellPadding="0" CellSpacing="0" HeaderStyle-BackColor="#EAEAEA"
        AutoGenerateColumns="false" CssClass="grid" AlternatingRowStyle-CssClass="gridAltRow"
        RowStyle-CssClass="gridRow" ShowFooter="False" EditRowStyle-CssClass="gridEditRow"
        FooterStyle-CssClass="gridFooterRow" OnRowCancelingEdit="gvpayment_RowCancelingEdit"
        OnRowCommand="gvpayment_RowCommand" OnRowDeleting="gvpayment_RowDeleting" OnRowUpdating="gvpayment_RowUpdating"
        DataKeyNames="RoomTypeId" OnRowEditing="gvpayment_RowEditing">
        <Columns>
            <asp:TemplateField HeaderText="Room Type" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="LblRoomType" runat="server" Text='<%# Eval("RoomType") %>'
                        Width="50"></asp:Label>
                </ItemTemplate>

                <EditItemTemplate>
                    <asp:TextBox ID="txtRoomType" runat="server" Text='<%# Bind("RoomType") %>'
                        CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtRoomType" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Occupancy" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="lblName" runat="server" Text='<%# Eval("Occupancy") %>' Width="50"></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <EditItemTemplate>
                    <asp:TextBox ID="txtOccupancy" runat="server" Text='<%# Bind("Occupancy") %>' CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtOccupancy" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Charge Non AC" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="lblnChargeAC" runat="server" Text='<%# Eval("ChargeNonAC","{0:n2}") %>'
                        Width="50"></asp:Label>
                </ItemTemplate>

                <ItemStyle HorizontalAlign="Right" />
                <EditItemTemplate>
                    <asp:TextBox ID="txtNChargeAC" runat="server" Text='<%# Bind("ChargeNonAC","{0:n2}") %>'
                        CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>

                    <asp:TextBox ID="txtNChargeAC" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Charge AC" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="lblChargeAC" runat="server" Text='<%# Eval("ChargeAC","{0:n2}") %>'
                        Width="50"></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Right" />
                <EditItemTemplate>
                    <asp:TextBox ID="txtChargeAC" runat="server" Text='<%# Bind("ChargeAC","{0:n2}") %>'
                        CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtChargeAC" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="IsExtraBedAllowed" HeaderStyle-HorizontalAlign="Left"
                Visible="false">
                <ItemTemplate>
                    <asp:CheckBox ID="ChkService" runat="server" Checked='<%# Eval("IsExtraBedAllowed") %>'
                        Width="50"></asp:CheckBox>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Right" />
                <EditItemTemplate>
                    <asp:CheckBox ID="chkservice" runat="server" Checked='<%# Bind("IsExtraBedAllowed") %>' />
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:CheckBox ID="chkservice" runat="server" />
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Extra Beds Allowed" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="lblMaxExtraBedsAllowed" runat="server" Text='<%# Eval("MaxExtraBedsAllowed") %>'
                        Width="50"></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
                <EditItemTemplate>
                    <asp:TextBox ID="txtMaxExtraBedsAllowed" runat="server" Text='<%# Bind("MaxExtraBedsAllowed") %>'
                        CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtMaxExtraBedsAllowed" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Bed Charge NonAC" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="lblExtraBedChargeNonA" runat="server" Text='<%# Eval("ExtraBedChargeNonAC","{0:n2}") %>'
                        Width="50"></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Right" />
                <EditItemTemplate>
                    <asp:TextBox ID="txtExtraBedChargeNonA" runat="server" Text='<%# Bind("ExtraBedChargeNonAC","{0:n2}") %>'
                        CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtExtraBedChargeNonA" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Bed Charge AC" HeaderStyle-HorizontalAlign="Left">
                <ItemTemplate>
                    <asp:Label ID="lblExtraBedChargeAC" runat="server" Text='<%# Eval("ExtraBedChargeAC","{0:n2}") %>'
                        Width="50"></asp:Label>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Right" />
                <EditItemTemplate>
                    <asp:TextBox ID="txtExtraBedChargeAC" runat="server" Text='<%# Bind("ExtraBedChargeAC","{0:n2}") %>'
                        CssClass="textbox"
                        Width="50"></asp:TextBox>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:TextBox ID="txtExtraBedChargeAC" runat="server" CssClass="textbox" Width="50"></asp:TextBox>
                </FooterTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Taxes" HeaderText="Taxes" />
            <asp:BoundField DataField="Services" HeaderText="Services" />
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:LinkButton ID="lnkEditType" runat="server" Text="Edit"
                        CommandName='<%#Eval("RoomTypeID") %>' OnCommand="lnkEdit_Command"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField ShowHeader="False" HeaderStyle-HorizontalAlign="Left" Visible="false">
                <EditItemTemplate>
                    <asp:LinkButton ID="lnkUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        Text="Update" OnClientClick="return confirm('Update?')" ValidationGroup="Update"></asp:LinkButton>
                    <asp:ValidationSummary ID="vsUpdate" runat="server" ShowMessageBox="true" ShowSummary="false"
                        ValidationGroup="Update" Enabled="true" HeaderText="Validation Summary..." />
                    <asp:LinkButton ID="lnkCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="Cancel"></asp:LinkButton>
                </EditItemTemplate>
                <FooterTemplate>
                    <asp:LinkButton ID="lnkAdd" runat="server" CausesValidation="True" CommandName="Insert"
                        ValidationGroup="Insert" Text="Add"></asp:LinkButton>
                    <asp:ValidationSummary ID="vsInsert" runat="server" ShowMessageBox="true" ShowSummary="false"
                        ValidationGroup="Insert" Enabled="true" HeaderText="Validation..." />
                </FooterTemplate>
                <ItemTemplate>
                    <asp:LinkButton ID="lnkEdit" runat="server" CausesValidation="False" CommandName="Edit"
                        Text="Edit"></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Left" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Delete" ShowHeader="False" HeaderStyle-HorizontalAlign="Left"
                Visible="false">
                <ItemTemplate>
                    <asp:LinkButton ID="lnkDelete" runat="server" CausesValidation="False" CommandName="Delete"
                        Text="Delete" OnClientClick="return confirm('Delete?')"></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Left" />
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
        </EmptyDataTemplate>
    </asp:GridView>
    &nbsp;
    <asp:LinkButton ID="btnAdd" runat="server" Text="AddNew"
        OnClick="btnAdd_Click" />
</asp:Panel>
<div>
   
</div>
<asp:HiddenField ID="hdnMode" runat="server" />
<asp:HiddenField ID="hdnRoomTypeID" runat="server" />
<asp:Panel ID="pnlAdd" runat="server" Visible="false" Width="520px">
    <div style="background-color: #006899; height: 25px; vertical-align: bottom; padding-top: 2px;
        padding-left: 2px;">

        &nbsp; <asp:Label id="lblMessage" runat="server"  Text="" style="color:white;font-weight:bold;"></asp:Label>
    </div>
    <table class="table">
            <tr class="gridRow">
                <td>Room Type</td>
                <td colspan="3" >
                    <asp:TextBox ID="RoomTypeTextBox" runat="server" CssClass="textbox" width="300px" />
                </td>
                
            </tr>
            <tr class="gridAltRow">
                <td>Occupancy</td>
                <td>
                    <asp:TextBox ID="OccupancyTextBox" runat="server" CssClass="textbox" /></td>
                 <td>MaxExtraBedsAllowed</td>
                <td>
                    <asp:TextBox ID="MaxExtraBedsAllowedTextBox" runat="server" CssClass="textbox" /></td>
            </tr>
            <tr class="gridRow">

                <td>ChargeNonAC</td>
                <td>
                    <asp:TextBox ID="ChargeNonACTextBox" runat="server" CssClass="textbox" /></td>
                <td>ChargeAC</td>
                <td>
                    <asp:TextBox ID="ChargeACTextBox" runat="server" CssClass="textbox" /></td>
            </tr>
             
            <tr class="gridAltRow">
                <td>ExtraBedChargeNonA</td>
                <td>
                    <asp:TextBox ID="ExtraBedChargeNonATextBox" runat="server" CssClass="textbox" /></td>
                <td>ExtraBedChargeAC</td>
                <td>
                    <asp:TextBox ID="ExtraBedChargeACTextBox" runat="server" CssClass="textbox" /></td>
            </tr>
          <tr class="gridRow">
              <td style="vertical-align:top">Tax</td>
              <td style="vertical-align:top"><asp:CheckBoxList runat="server" id="checkBoxTax"  
                     ></asp:CheckBoxList></td>
              <td style="vertical-align:top">Services</td>
              <td style="vertical-align:top;style="border: none;""><asp:CheckBoxList runat="server" 
                      id="checkBoxService"    ></asp:CheckBoxList></td>
              </tr>

      
            
            <tr>
                <td colspan="4" style="text-align: right">
                    <asp:Button ID="BtnSave" runat="server" Text="Save" CssClass="button"
                        OnClick="BtnSave_Click"></asp:Button>&nbsp;<asp:Button ID="btnCancel"
                            runat="server" Text="Cancel" CssClass="button" 
                        OnClick="btnCancel_Click" ></asp:Button></td>
            </tr>
        </table>

</asp:Panel>

